package chap2_4;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author https://gitee.com/W_Jun
 * @version 1.0
 * @date 2021-11-26 21:10
 * @Description
 */
public class FileOutputStreamDemo04 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream("chapter02-字节流\\fos.txt");
            fos.write("hello".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
